package com.jusda.api.task;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @author:y022 22/04/2022 21:46
 * @description:定时任务
 */
//@Component
@Slf4j
@RequiredArgsConstructor
public class MsgSchedule {
    private  final TaskManager taskManager;

    /**
     * 每90s执行一次
     */
    @Scheduled(fixedDelay = 90000, initialDelay = 10000)
    public void pushUserScore() {
       taskManager.pushUserScoreTask();
    }

}
